package com.woniu.p2p.behindController;

import com.github.pagehelper.PageInfo;
import com.woniu.p2p.behindService.OperationPerformanceService;
import com.woniu.p2p.entity.Homepage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * OperationPerformanceController
 *
 *
 */
@Controller
@RequestMapping("/operationPerformance")
public class OperationPerformanceController {

    @Autowired
    OperationPerformanceService operationPerformanceService;

    @RequestMapping("/selectOperationPerformance")
    public String selectOperationPerformance(Integer pageNum, Map map){

        Integer start=pageNum==null?1:pageNum;

        PageInfo<Homepage> pageInfo = operationPerformanceService.selectAllByName(start);
        map.put("homePage",pageInfo);
        return "content/operationPerformance";
    }
}
